Get Company Ticket by ID
The Get Company Ticket by ID API displays the details of a chosen company that is to be sent for approval.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
id Mandatory | String Unique ID for each request |
method Mandatory | String Method Name - should be "VisaService.GetTicketById" |
params Mandatory | Object |
api Mandatory | Object |
credential Mandatory | String API credential provided by NetXD |
signature Mandatory | String Signature of the digitally signed payload |
payload Mandatory | Object |
id Mandatory | String Company Id |
- cURL
- C#
- Go
- NodeJs
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"id":"1","method":"VisaService.GetTicketById","params":{"api":{"credential":"Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=","signature":"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="},"payload":{"id":"63514aff553b98c3309d8e9e"}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""method"": ""VisaService.GetTicketById"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""credential"": ""Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ="",
" + "\n" +
@" ""signature"": ""MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""id"": ""63514aff553b98c3309d8e9e""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"id": "1",`+"
"+`
"method": "VisaService.GetTicketById",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"credential": "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=",`+"
"+`
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"id": "63514aff553b98c3309d8e9e"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"id": "1",
"method": "VisaService.GetTicketById",
"params": {
"api": {
"credential": "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"id": "63514aff553b98c3309d8e9e"
}
}
});
req.write(postData);
req.end();
Body
{
"id": "1",
"method": "VisaService.GetTicketById",
"params": {
"api": {
"credential": "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"id": "63514aff553b98c3309d8e9e"
}
}
}
Response: 200
Response Parameters
Parameter | Description |
---|---|
jsonrpc | String JSON RPC VERSION Example: " 2.0" |
result | Object |
ticket | Object |
id | String Unique ID for each request Example: " 65df3eb6bc2422fb17c9756c" |
createdUser | String Username of the user who added the company Example: " admin@netxd.com" |
createdTime | String Date and time of the company was added Example: " 2024-02-28T14:09:58.688Z" |
bankId | String Unique bank Id of the company Example: " 658c2c40a98c5ce653189e57" |
status | String Status of the company Example: " CREATED" |
type | String Type of ticket Example: " ADD_COMPANY" |
params | Object |
_id | String Ticket id Example: " 65df3eb5bc2422fb17c9756a" |
accountNumber | String Account number of the company Example: " 8769557687" |
active | Boolean Status of the company Example: false |
address1 | String Address line 1 of Company Example: " 12529 State Road 535" |
address2 | String Address line 2 of Company Example: " 12529 State Road 535" |
approve | Boolean To be approved Example: true |
bankId | String Company's Bank ID Example: " 658c2c40a98c5ce653189e57" |
blockedCountries | Array List of blocked countries |
blockedCurrencyList | Array List of blocked currencies |
businessRegistrationNumber | String Business Registration Number of Company Example: " 122324234234" |
companyId | String Unique ID of company Example: " 65df3eb5bc2422fb17c9756a" |
companyTerms | String Terms and conditions of the company Example: " Establish payment terms" |
corporateLegalName | String Legal name of company Example: " Lake Buena Vista" |
countryIsoCode | String Company Country ISO Code Example: " 840" |
createdDate | String Created Date and time of the particular company Example: " 2024-02-28T19:39:57.191+05:30" |
dailyVolume | String Daily volume transaction Example: " 99999999990" |
defaultCurrencyIsoCode | String Default currency code Example: " 840" |
enterpriseId | String Enterprise ID of company Example: " V-USA-EUR-10080373-100000001-001" |
fxMargin | Number Margin for foreign exchange transaction Example: 1 |
industryCode | String Industry Code of company Example: " 01" |
isOnFlyCorporate | Boolean Determines adding new companies for payment If enabled (True) – allows for addition of new company during payment If disabled (False) – new company can be added only through ‘addCompany' API call Example: false |
orgName | String Company name Example: " LAKE BUENA VISTA" |
perTransactionLimit | Number Maximum amount allowed to be transacted in a single transaction for corporate users Example: 3 |
singleTransaction | String Maximum amount allowed to be transacted in a single transaction Example: " 250000" |
status | String Status of the company ticket Example: " WAITING_FOR_APPROVAL" |
taxId | String Tax ID of company Example: " 434345345" |
keyId | String Company ID Example: " 65df3eb5bc2422fb17c9756a" |
owner1WatchListCount | String 1 st owner watchlist score Example: " Disabled" |
owner2WatchListCount | String 2 nd owner watchlist score Example: " Disabled" |
owner3WatchListCount | String 3 rd owner watchlist score Example: " Disabled" |
watchListCount | String Watchlist count of company Example: " Disabled" |
id | String Unique ID of request Example: " 1" |
{
"jsonrpc": "2.0",
"result": {
"ticket": {
"id": "65df3eb6bc2422fb17c9756c",
"createdUser": "admin@netxd.com",
"createdTime": "2024-02-28T14:09:58.688Z",
"bankId": "658c2c40a98c5ce653189e57",
"status": "CREATED",
"type": "ADD_COMPANY",
"params": {
"_id": "65df3eb5bc2422fb17c9756a",
"accountNumber": "8769557687",
"active": false,
"address1": "12529 State Road 535",
"address2": "12529 State Road 535",
"approve": true,
"bankId": "658c2c40a98c5ce653189e57",
"blockedCountries": [
"ALB",
"AGO"
],
"blockedCurrencyList": [
"ALL",
"AMD"
],
"businessRegistrationNumber": "122324234234",
"companyId": "65df3eb5bc2422fb17c9756a",
"companyTerms": "Establish payment terms",
"corporateLegalName": "Lake Buena Vista",
"countryIsoCode": "840",
"createdDate": "2024-02-28T19:39:57.191+05:30",
"dailyVolume": "99999999990",
"defaultCurrencyIsoCode": "840",
"enterpriseId": "V-USA-EUR-10080373-100000001-001",
"fxMargin": 1,
"industryCode": "01",
"isOnFlyCorporate": false,
"orgName": "LAKE BUENA VISTA",
"perTransactionLimit": 3,
"singleTransaction": "250000",
"status": "WAITING_FOR_APPROVAL",
"taxId": "434345345"
},
"keyId": "65df3eb5bc2422fb17c9756a",
"owner1WatchListCount": "Disabled",
"owner2WatchListCount": "Disabled",
"owner3WatchListCount": "Disabled",
"watchListCount": "Disabled"
}
},
"id": "1"
}